<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    /* paused动画暂停 */
    .ball{
        width: 100px;
        height: 100px;
        background-color: red;
        border-radius: 50%;
        animation:move 1s cubic-bezier(0.76, 0.64, 0.6, -0.22) forwards paused;
    }
    @keyframes move {
        50%{
            background-color:skyblue
        }
        100%{
            background-color:green
        }
        to{
            margin-left: 300px;
        }
    }
</style>
<body>
    <div class="ball"></div>
    <input type="range" min="0" max="1" step="0.01" value="0" id="tangedata">
</body>
</html>
<script>
    var ball = document.querySelector(".ball")
    var tangedata = document.getElementById("tangedata")
    tangedata.oninput = (e)=>{
        ball.style.animationDelay = `-${ e.target.value }s `
    }
</script>